//
//  EpointDateUtils.h
//  EpointFrame5
//  日期相关工具类
//  Created by 李亚春 on 14-2-8.
//  Copyright (c) 2014年 Epoint. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface EpointDateUtils : NSObject

//根据规定日期格式，获取系统当天日期字符串,如YYYY-MM-dd HH:mm:ss
+ (NSString *)getCurrentDateStr:(NSString *)format;

+(NSDate *)convertStr2Date:(NSString *)timestr format:(NSString *)format;

+(NSString *)convertDate2FormatStr:(NSDate *)_date format:(NSString *)format;

+ (NSString *)convertStr2FromStr:(NSString *)_str oldFormat:(NSString *)oldFormat withNewFormat:(NSString *)newFormat;

+ (NSString *)convertToMailListNeededFormat:(NSString *)_str;
+ (NSString *)convertToMailListNeededFormat2:(NSString *)_str;

+ (NSString *)convertToCalendarNeedFormat:(NSDate *)date;

+ (NSString *)getDay:(NSDate *)date;

+ (NSString *)convertDate2FormatYMDHMStr:(NSDate *)_date;
+ (NSDate *)convertString2YMDHMDate:(NSString *)_str;
+ (NSDate *)convertString2YMDHMSDate:(NSString *)_str;

//获取某个日期所在年份的天数
+ (int)getNumberOfDaysOneYear:(NSDate *)date;

//获取某个日期所在月份的天数
+(int)getNumberOfDaysOneMonth:(NSDate *)date;

+ (NSDate *)getDateDifferWithDate:(NSDate *)date differDays:(int)differDay;
+ (NSInteger)getWeekWithDate:(NSDate*)date;

+ (NSArray *)getMonAndSunInWeekWithDifferWeeks:(int)differWeek;

+(NSString *)getWeekNameByDate:(NSDate *)date;

+(int)getWeek:(NSDate *)date;

+(NSString *)getWeekName:(int)week;

@end
